import {get,post} from '../../http';

// 宿舍
export function Dormitory() {
	return {
		/**
		 * 增加宿舍
		 * @param {*} params 
		 * @returns 
		 */
		 adddormitory: (params:any) => {
			return post({
				url: '/hr/dormitory/addDormitory',
				data: params,
			});
		},
		/**
		 * 修改宿舍
		 * @param {*} params 
		 * @returns 
		 */
		 updateDormitory: (params:any) => {
			return post({
				url: '/hr/dormitory/updateDormitory',
				data: params,
			});
		},
		/**
		 * 获取生效的宿舍
		 * @returns 
		 */
		getAllActiveDormitory: (params:any) => {
			return post({
				url: '/hr/dormitory/getAllActiveBaDormitory',
				data: params,
			});
		},
		/**
		 * 通过区域id获取生效的宿舍
		 * @returns 
		 */
		 getAllActiveDormitorybyAreaId: (params:any) => {
			return post({
				url: '/hr/dormitory/getAllActiveDormitorybyAreaId',
				data: params,
			});
		},
            /**
             * 获取所有宿舍
             * @param {*} params 
             * @returns 
             */
			 getDormitoryList: (params:any) => {
                return post({	
                    url: '/hr/dormitory/getDormitoryList',
                    data: params,
                });
            },
			  /**
             * 获取有闲置床位的所有宿舍
             * @param {*} params 
             * @returns 
             */
			   getDormitoryList2: (params:any) => {
                return post({	
                    url: '/hr/dormitory/getDormitoryList2',
                    data: params,
                });
            }
        }
}




// 宿舍设备配置
export function dormitoryEquipment() {
	return {
		/**
		 * 增加宿舍设备配置
		 * @param {*} params 
		 * @returns 
		 */
		 adddormitoryEquipment: (params:any) => {
			console.log(params)
			return post({
				url: '/hr/dormitory-equipment/adddormitoryEquipment',
				data: params,
			});
		},
		/**
		 * 修改宿舍设备配置
		 * @param {*} params 
		 * @returns 
		 */
		 updatedormitoryEquipment: (params:any) => {
			return post({
				url: '/hr/dormitory-equipment/updatedormitoryEquipment',
				data: params,
			});
		},
		/**
		 * 获取生效的宿舍设备配置
		 * @returns 
		 */
		getAllActivedormitoryEquipment: () => {
			return get({
				url: '/hr/dormitory-equipment/getAllActivedormitoryEquipment',
			});
		},
            /**
             * 获取所有宿舍设备配置
             * @param {*} params 
             * @returns 
             */
			 getdormitoryEquipmentList: (params:any) => {
                return post({	
                    url: '/hr/dormitory-equipment/getDormitoryEquipmentList',
                    data: params,
                });
            },
			  /**
             * 通过宿舍Id获取所有宿舍设备配置
             * @param {*} params 
             * @returns 
             */
			   getdormitoryEquipmentListByDormitory: (params:any) => {
                return post({	
                    url: '/hr/dormitory-equipment/getdormitoryEquipmentListByDormitory',
                    data: params,
                });
            },
			  /**
             * 通过设备类型Id获取所有设备信息	
             * @param {*} params 
             * @returns 
             */
			   getdormitoryEquipmentListByEquipmentTypeId: (params:any) => {
                return post({	
                    url: '/hr/dormitory-equipment/getdormitoryEquipmentListByEquipmentTypeId',
                    data: params,
                });
            }

        }
}





